<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>尝试使用日历插件</title>
    <link rel="stylesheet" href="./calendar.css">
    <style>
        #demo{
            width: 300px;
            height: 150px auto;
        }
        p { margin: 0;}
        #dt {
            margin: 30PX auto;
            height: 28px;
            width: 200px;
            padding: 0 6px;
            border: 1px solid #ccc;
            outline: none;
        }
    </style>
</head>
<body>
    <div id="demo">
         <div id="ca"></div>
    </div>
    <input type="datetime" id="input-cal">
</body>
<script src="./js/jquery.js"></script>
<!--日历js是基于jquery的 所以先引入jquery 否则 效果无法实现-->
<script src="./js/calendar.js"></script>
<script>
    $("#ca").calender({
        width:320,
        height:200,
        prev:"<",
        next:">",
        onSelectde:function(view,date,data){
        console.log(view);
        console.log(date);
        console.log(data);
        $("#input-cal").val(date)      }
         })
</script>
</html>